package com.hsmpay.mobile.service.terminal.impl;

import com.hsmpay.common.service.impl.BaseServiceSupport;
import com.hsmpay.mobile.dao.terminal.TchannelDao;
import com.hsmpay.mobile.pojo.terminal.Tchannel;
import com.hsmpay.mobile.service.terminal.TchannelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 大poss 终端通道 服务接口 tchannelService
 * 对应 sqlmap tchannelDao
 *
 * @author 颜铃璋
 * @created 2014-05-20
 */
@Service("tchannelService")
public class TchannelServiceImpl extends BaseServiceSupport<Tchannel, Long> implements TchannelService<Tchannel, Long> {
    @Resource(name = "tchannelDao")
    private TchannelDao<Tchannel, Long> tchannelDao;


    /**
     * 根据终端代码  查询通道
     *
     * @param code
     * @return
     * @throws Exception
     */
    public Tchannel searchMobileTchannelByCode(Integer code) throws Exception {
        return tchannelDao.searchMobileTchannelByCode(code);
    }

    /**
     * 更新code 修改更新第三方参数
     *
     * @param code
     * @param otherParam
     * @return
     * @throws Exception
     */
    public int updateMobileTcOtherByCode(Integer code, String otherParam) throws Exception {
        return tchannelDao.updateMobileTcOtherByCode(code, otherParam);
    }
}